<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('人员不良行为记录')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>姓名：</p>
                                <input type="text" name="accename"/>
                            </li>
                            <li>
                                <p>工程名称：</p>
                                <input type="text" name="operator"/>
                            </li> 
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
    var prefix = ctx + "integrityInformation/personBadBehavior";
    
    $(function() {
    	//$('#bootstrap-table').bootstrapTable({
    	  var options = {
    			showSearch:false,
              	showRefresh:false,
              	showToggle:false,
              	showColumns:false,
    			url: prefix + "/personBadBehaviorList",
                detailUrl: prefix + "/personBadBehaviorDetail/{id}",
                modalName: "企业不良行为", 
                columns: [{
                        field: 'id',
                        title: '序号',
						formatter: function (value, row, index) {
						
						    return index + 1;
						}
                    },
                     {
                        field: 'behaviordescription',
                        title: '行为描述',
                        formatter: function (value, row, index) {
	                            var actions = [];
	                            actions.push('<a href="javascript:void(0)" onclick="$.operate.detailFull(\'' + row.name + '\')">'+value+'</a>'); 
	                            //actions.push('<a href="javascript:void(0)" onclick="$.operate.detailFull(\'' + row.id + '\')">'+value+'</a>');
	                            return actions.join('');
	                        }
                     }, 
                     {
                        field: 'name',
                        title: '姓名'
                     }, 
                     {
                        field: 'code',
                        title: '证件号码'
	                 }, 
                    {
                        field: 'projectname',
                        title: '工程名称'
                    },
                    {
                        field: 'punishmentinstitution',
                        title: '处罚机构'
                    },
                    {
                        field: 'deductionscore',
                        title: '扣分分值'
                    },
                    {
                        field: 'time',
                        title: '登记日期'
                    },
                    {
                        field: 'states',
                        title: '状态'
	                }]
    	   // })
        };
    	$.table.init(options);
    });
    </script>
</body>
</html>